<?php echo anchor("/admin/addVendor", "Add Vendor");?>
<form id="searchForm" action="<?php echo site_url('/admin/vendor');?>" method="post">
	<table id="searchTable" align="center" border="1">
	<tr>
		<td align="center">
			<h2>Search</h2>
		</td>
	</tr>
	<tr>
	<?php foreach($fields as $field):?>
		<td><label for="<?php echo $field; ?>"><?php echo ucfirst($field); ?></label></td>
		<td><input type="text" size=25 id = <?php echo $field; ?> name="<?php echo $field; ?>" value=""/></td>
	<?php endforeach;?>
	</tr>
	<tr>
		<td><input type="submit" value="search" id="btn_searchForm"/></td>
		<td><input type="reset" value="clear" id="btn_clearForm"/></td>
	</tr>
	</table>
</form>
<div> Found <?php echo $totalResult;?></div>
<table class="tablesorter" id="searchResult">
	<thead>
		<th>ID</th>
		<th>Name</th>
		<th>Vendor Code</th>
		<th>Business Type</th>
		<th></th>
	</thead>
	<tbody>
		<?php foreach($vendors as $vendor): ?>
		<tr>
			<td><?php echo anchor('/admin/vendorDetail/'.$vendor->getId(), $vendor->getId());?></td>
			<td><?php echo $vendor->getVendorName();?></td>
			<td><?php echo $vendor->getVendorCode();?></td>
			<td><?php echo $vendor->getBusinessType();?></td>
			<td>d</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
<?php if(strlen($pagination)):?>
<div>
	Pages: <?php echo $pagination; ?>
</div>
<?php endif;?>